package com.pingba.util;

import com.pingba.entity.BaseEntity;
import com.pingba.util.helper.JsonHelp;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * Created by Administrator on 2015/10/29 0029.
 */
public class ReturnHelp {
    private ReturnHelp() {

    }

//    public static String getReturnString(boolean result, BaseEntity msg) {
//        Map<String, Object> returnMap = new HashMap<String, Object>();
//        returnMap.put("result", result);
//        returnMap.put("msg", msg);
//        return JsonHelp.jsonFromObject(returnMap);
//    }

    public static String getReturnString(boolean result, Object object) {
//        System.out.println("param object called!");

        Map<String, Object> returnMap = new HashMap<String, Object>();
        returnMap.put("result", result);
        returnMap.put("msg", object);
        return JsonHelp.jsonFromObject(returnMap);
    }

//    public static String getReturnString(boolean result, String msg) {
//        Map<String, Object> returnMap = new HashMap<String, Object>();
//        returnMap.put("result", result);
//        returnMap.put("msg", msg);
//        return JsonHelp.jsonFromObject(returnMap);
//    }
}
